<?php

/**
 * camera components.
 *
 * @package    SXShopCartPlugin
 * @author    Mina Gerges
 */
class shopCartComponents extends sfComponents
{
    /**
     * View content of shop cart in products page
     */
    public function executeShopCartProductsList()
    {
        $productsArray = $this->getUser()->getAttribute('shopCart', array());
        $this->products = array();
        if (count($productsArray) > 0)
        {
            $this->products = ProductTable::getInstance()->getAllProducts(array_keys($productsArray))->execute();
        }
    }

}